#ifndef MAFENETRESERVEUR_H
#define MAFENETRESERVEUR_H

#include <QtGui>
#include <QtNetwork>
#include <QIcon>

#include "MaFenetre.h"
#include "MonBoutonPush.h"
#include "Serveur.h"
#include "MaFicheClient.h"

class MaFenetreServeur : public MaFenetre
{
    Q_OBJECT

public:
    MaFenetreServeur(QTabWidget *parent, Serveur *serveur);

private:
    Serveur *serveur;

    QVBoxLayout *layoutGauche;
    QFormLayout *formLayout;
    QLineEdit *port;
    QCheckBox *checkPass;
    QLineEdit *pass;
    MonBoutonPush *monBoutonPushGoServ;
    MonBoutonPush *monBoutonPushDownServ;
    QTextEdit *texte;

    QWidget *mainWidgetListeClients;
    QLayout *mainLayoutListeClients;
    QScrollArea *mainScrollAreaListeClients;
    QVBoxLayout *scrollAreaVLayout;
    QWidget * scrollAreaWidgetContents;

    QMap<QString, QWidget*> mapFicheClient;

public slots:
    void lancerServeur();
    void arreterServeur();
    void ajouterFicheClient(QString nom, QString ip);
    void enleverFicheClient(QString nom);
    void afficheLog(QString log);
};

#endif // MAFENETRESERVEUR_H
